/*
 * ELM327.h
 *
 */
#ifndef __ELM327_H_
#define __ELM327_H_

#ifdef  __cplusplus
extern "C" {
#endif		/* __cplusplus */


#include "config.h"
#include "Queue.h"
  
#define ELM327_ATZ          0
#define ELM327_ATSP0        1
#define ELM327_RPM          2
#define ELM327_SPEED        3
#define ELM327_ATDPN        4
#define ELM327_ATRV         5
#define ELM327_TEMPRO       6
#define ELM327_ATDP         7
#define ELM327_ATCV1450     8
#define ELM327_WAIT			9
#define ELM327_OK			10

extern QBuf gELM327TxQBuf;
extern QBuf gELM327RxQBuf;

extern short elm327_speed;
extern unsigned long elm327_dbug;

void ELM327_Init(void);
void ELM327_CMD_Send(int idx);
void ELM327_Write(char *buf, unsigned short count);
void ELM327_Task(void);
void ELM327_UART_IRQ_Tx_Callback(void);
void ELM327_UART_IRQ_Rx_Callback(void);

#ifdef __cplusplus
}
#endif	/* __cplusplus */
#endif	/* __ELM327_H_ */